package NGUYENVIETANH.OOP.EXCERCISE3.GPTB2;

public class MODELS {
	public double GIAIPTBAC2(int a, int b, int c){
		double KQ = 0;
		double delta;
		delta = (b*b) - 4*(a*c);
		
		 if(delta == 0){
			 KQ=-b/(2*a);
		 }
		 else if(delta >0){
			 KQ = ((-b)+Math.sqrt(delta)/(2*a));
			 KQ = ((-b)-Math.sqrt(delta)/(2*a));
		 }
		 else System.out.println(" + PT vô nghiệm rồi thanh niên !");
		 return KQ;
	}
}
